﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administration/Main.Master" AutoEventWireup="true"
	CodeBehind="List.aspx.cs" Inherits="FSViet.Survey.Administration.Question.List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<div><asp:HyperLink ID="NewButton" runat="server" NavigateUrl="~/Administration/Question/Details.aspx">Create new question</asp:HyperLink></div>
<div><asp:Label ID="msg" runat="server" Font-Bold="True" ForeColor="Blue" /></div>
<div>Search:</div>
<div><asp:TextBox ID="KeywordInput" runat="server" />
	<asp:Button ID="SearchButton" runat="server" Text="Search" 
		onclick="SearchButton_Click" />
	<asp:Button
		ID="ReloadButton" runat="server" Text="Reload" onclick="ReloadButton_Click" />
		<asp:Button ID="ClearCacheButton" runat="server" Text="Clear cache" 
		onclick="ClearCacheButton_Click" />
		</div>
<div><asp:GridView ID="ListItem" runat="server" AutoGenerateColumns="False" 
		onrowdatabound="ListItem_RowDataBound" EnableModelValidation="True" 
		onrowcommand="ListItem_RowCommand">
	<Columns>
		<asp:HyperLinkField DataNavigateUrlFields="Id" 
			DataNavigateUrlFormatString="../Answer/List.aspx?QuestionId={0:N}" 
			HeaderText="Answer" Text="Show" />
		<asp:TemplateField HeaderText="Name">
			<ItemTemplate>
			<div>
				<asp:HyperLink ID="HyperLink1" runat="server" 
					NavigateUrl='<%# Eval("Id", "Details.aspx?Id={0}") %>' 
					Text='<%# Eval("Name") %>'></asp:HyperLink></div>
					<div class="groupinfo"><asp:ImageButton ID="RemoveGroupButton" Visible="false" runat="server" ImageUrl="~/Images/del.jpg" ToolTip="Remove group" /><asp:HyperLink ID="GroupLink" runat="server" Visible="false" /></div>
				<div class="answergroupinfo">
					<asp:HyperLink ID="AnswerGroupLink" runat="server" Visible="false" />
				</div>
			</ItemTemplate>
		</asp:TemplateField>
		<asp:HyperLinkField DataNavigateUrlFields="Id" 
			DataNavigateUrlFormatString="../Question/List.aspx?QuestionId={0:N}" 
			HeaderText="Assign to group" Text="Assign" />
			
		<asp:TemplateField HeaderText="Show group info">
			<ItemTemplate>
				<asp:HyperLink ID="ShowGroupInfo" runat="server" 
					NavigateUrl='<%# Eval("Id", "../Question/Details.aspx?Id={0:N}")+"&QuestionType=3" %>' Text="Show"></asp:HyperLink>
			</ItemTemplate>
		</asp:TemplateField>
		<asp:TemplateField Visible="false">
			<ItemTemplate>
				<asp:Button ID="AssignGroupButton" runat="server" Text="Assign to group" />
			</ItemTemplate>
		</asp:TemplateField>
	</Columns>
</asp:GridView>
</div>
<div class="pages"><asp:Panel id="PageList" runat="server"/></div>
</asp:Content>